import { ChannelSaveId, ChannelSaveList } from '../action/actionTypes';

const initialState = {
  list: [],
  channelId: 0,
};

const channelReducer = (state = initialState, { type, payload }) => {
  switch (type) {
    case ChannelSaveList:
      return { ...state, list: payload };
    case ChannelSaveId:
      return { ...state, channelId: payload };
    default:
      return state;
  }
};

export default channelReducer;
